 {
        
   cc.Class({
            extends: cc.Component,
            properties: {
                seatId: 0,
                nodeArrow: {
                    default: null,
                    type: cc.Node
                },
                effectNodeHuPrefab: {
                    default: null,
                    type: cc.Prefab
                },
                nodeArrowOffsetX: 0,
                nodeArrowOffsetY: 0,
                _lastPlayedNode: null
            },
            onLoad: function () {
                Global.notificationCenter.on(Global.eventName.GAME_REFRESH_STAND_TILE, this._refreshPlayed.bind(this), this),
                    Global.notificationCenter.on(Global.eventName.GAME_REFRESH_ARROW, this._refreshArrow.bind(this), this);
                for (var e = 0; e < 35; e++) {
                    var t = "Node" + (Math.floor(e % 7) + 1) + (Math.floor(e / 7) + 1), n = this.node.getChildByName(t);
                    n && (n.active = !1);
                }
                this.nodeArrow.active = !1;
            },
            onDestroy: function () {
                Global.notificationCenter.offAll(this);
            },
            start: function () {
            },
            _refreshPlayed: function (e) {
                if (null == e || void 0 == e.winloseSeatId || Global.tableModel.toLocalSeatIndex(e.winloseSeatId) == this.seatId) {
                    for (var t = 0; t < 35; t++) {
                        var n = "Node" + (Math.floor(t % 7) + 1) + (Math.floor(t / 7) + 1);
                        (a = this.node.getChildByName(n)) && (a.active = !1);
                    }
                    this._lastPlayedNode = null;
                    var o = Global.tableModel.getPlayerModel(this.seatId);
                    if (o) {
                        var i = o.getPlayed_tiles();
                        for (t = 0; t < i.length; t++) {
                            n = "Node" + (Math.floor(t % 7) + 1) + (Math.floor(t / 7) + 1);
                            if (a = this.node.getChildByName(n)) a.active = !0, (c = a.getComponent("PlayedController")) && c.bindData(i[t]),
                            t == i.length - 1 && (this._lastPlayedNode = a);
                        }
                        if (null != e && 1 == e.isDelTile && Global.tableModel.toLocalSeatIndex(e.winloseSeatId) == this.seatId) {
                            cc.log("NodePlayedController  data = " + JSON.stringify(e), " this.seatId = " + this.seatId);
                            var a;
                            n = "Node" + (Math.floor(t % 7) + 1) + (Math.floor(t / 7) + 1);
                            if (a = this.node.getChildByName(n)) {
                                a.active = !0;
                                var r = cc.instantiate(this.effectNodeHuPrefab);
                                this.node.addChild(r), r.setPosition(cc.p(a.x, a.y)), r.getComponent(cc.Animation).onMidCallback = function () {
                                    a.active = !1;
                                }.bind(this), r.getComponent(cc.Animation).onAniEnd = function () {
                                    r.removeFromParent(), r.isValid && r.destroy();
                                }.bind(this);
                            }
                        }
                    }
                    if (null != e && null != e.seatId && this._refreshArrow(e.seatId), null != e && e.seatId == this.seatId && null != this._lastPlayedNode) {
                        var s = cc.p(0, 0), l = cc.p(this._lastPlayedNode.x, this._lastPlayedNode.y);
                        this.seatId == Global.config.SEAT_DOWN && (s.x = this._lastPlayedNode.x + 100, s.y = this._lastPlayedNode.y - 100,
                            this._lastPlayedNode.rotation = 0, this._lastPlayedNode.scaleX = 1.3, this._lastPlayedNode.scaleY = 1.3),
                        this.seatId == Global.config.SEAT_RIGHT && (s.x = this._lastPlayedNode.x + 100,
                            s.y = this._lastPlayedNode.y + 100, this._lastPlayedNode.rotation = 90, this._lastPlayedNode.scaleX = 1.3,
                            this._lastPlayedNode.scaleY = 1.3), this.seatId == Global.config.SEAT_UP && (s.x = this._lastPlayedNode.x - 100,
                            s.y = this._lastPlayedNode.y + 100, this._lastPlayedNode.rotation = 180, this._lastPlayedNode.scaleX = 1.3,
                            this._lastPlayedNode.scaleY = 1.3), this.seatId == Global.config.SEAT_LEFT && (s.x = this._lastPlayedNode.x - 100,
                            s.y = this._lastPlayedNode.y - 100, this._lastPlayedNode.rotation = 270, this._lastPlayedNode.scaleX = 1.3,
                            this._lastPlayedNode.scaleY = 1.3);
                        var c, d = 1;
                        (c = this._lastPlayedNode.getComponent("PlayedController")) && (d = c.tileScale);
                        i = o.getPlayed_tiles();
                        var u = cc.callFunc(function () {
                                i && i.length > 0 && Global.notificationCenter.emit(Global.eventName.GAME_SHOW_BIGPLAYEDTILE, {
                                    seatIdLocal: this.seatId,
                                    playerModel: o,
                                    tile: i[i.length - 1]
                                });
                            }.bind(this)), h = cc.spawn(cc.moveTo(.2, l), cc.rotateTo(.2, 0), cc.scaleTo(.2, d)),
                            f = cc.sequence(cc.place(s), h, u);
                        this._lastPlayedNode.runAction(f);
                    }
                }
            },
            _refreshArrow: function (e) {
                e == this.seatId && null != this._lastPlayedNode ? (this.nodeArrow.active = !0,
                    this.nodeArrow.x = this._lastPlayedNode.x + this.nodeArrowOffsetX, this.nodeArrow.y = this._lastPlayedNode.y + this.nodeArrowOffsetY) : this.nodeArrow.active = !1;
            }
        })
    }